//
//  FirstOneCollectionCell.m
//  ShopDemo
//
//  Created by Sunshine on 2018/7/12.
//  Copyright © 2018年 飞扬的青春. All rights reserved.
//

#import "FirstOneCollectionCell.h"

@implementation FirstOneCollectionCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
         [self.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
        UIImageView *imagevi = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0,frame.size.width - 30, frame.size.height - 50*kJLXWidthScale)];
        imagevi.contentMode = UIViewContentModeScaleAspectFill;
        self.titImageview = imagevi;
        [self.contentView addSubview:imagevi];
        UILabel *lab = [UILabel new];
        lab.font = [UIFont systemFontOfSize:15*kJLXWidthScale];
        lab.textAlignment = NSTextAlignmentCenter;
        lab.textColor = [UIColor blackColor];
        self.titlab = lab;
        [self.contentView addSubview:lab];
        lab.sd_layout
        .topSpaceToView(imagevi, 0)
        .centerXEqualToView(imagevi)
        .widthRatioToView(imagevi, 1)
        .heightIs(30*kJLXWidthScale);
        
        UILabel *lab1 = [UILabel new];
        lab1.font = [UIFont systemFontOfSize:15*kJLXWidthScale];
        lab1.textAlignment = NSTextAlignmentCenter;
        lab1.textColor = [UIColor blackColor];
        self.pricelab = lab1;
        [self.contentView addSubview:lab1];
        lab1.sd_layout
        .topSpaceToView(lab, 0)
        .centerXEqualToView(lab)
        .widthRatioToView(lab, 1)
        .autoHeightRatio(0);
    }
    return self;
}



@end
